package com.kid.keep.controller;

import com.honeybee.cloud.framework.common.response.ResponseEntity;
import com.kid.keep.dto.MessageDTO;
import com.kid.keep.vo.AddUserVO;
import com.kid.keep.vo.MessageVO;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

/**
 * @Description 消息
 * @Author JOHN
 * @Create 2020-01-13
 * @Since 1.0.0
 */
@RequestMapping("kid-keep")
public interface IMessageController {

    /**
     * 查询未读消息数量
     *
     * @return
     */
    @RequestMapping(name = "查询未读消息数量", value = "/v1/messages/number", method = RequestMethod.GET)
    ResponseEntity<Integer> getUnReadMessage();
    /**
     * 查询未读消息数量
     *
     * @return
     */
    @RequestMapping(name = "查询未读消息列表", value = "/v1/messages", method = RequestMethod.GET)
    ResponseEntity<List<MessageVO>> getUnReadMessageList();

    /**
     * 阅读消息
     * @param messageId
     * @return
     */
    @RequestMapping(name = "阅读消息", value = "/v1/messages/{messageId}", method = RequestMethod.POST)
    ResponseEntity<Void> readMessage(@PathVariable("messageId") Long messageId);

    /**
     * 全部已读
     * @return
     */
    @RequestMapping(name = "全部已读", value = "/v1/messages", method = RequestMethod.PUT)
    ResponseEntity<Void> readMessage();
}
